import request from '@/utils/request'

export function getPage(query) {
  return request({
    url: '/courseInfo/page',
    method: 'get',
    params: query
  })
}


export function addObj(obj) {
  return request({
    url: '/courseInfo',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/courseInfo/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/courseInfo/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/courseInfo',
    method: 'put',
    data: obj
  })
}

export function getTeacherList() {
  return request({
    url: '/courseTeacher/list',
    method: 'get'
  })
}


export function addCourseFile(obj) {
  return request({
    url: '/courseFile',
    method: 'post',
    data: obj
  })
}

export function getImageList(id) {
  return request({
    url: '/courseInfo/getImageListById/' + id,
    method: 'get'
  })
}

export function getVideoList(id) {
  return request({
    url: '/courseInfo/getVideoListById/' + id,
    method: 'get'
  })
}

export function delOssFile(id) {
  return request({
    url: '/courseInfo/delOssFile/' + id,
    method: 'get'
  })
}
